import { ErrorRoutes } from './pages/Errors/route';
import { routerList } from './utils/routerList';

export const router: any = [
    {
        path: '/',
        component: '@/pages/index',
        routes: [
            {
                path: '/',
                redirect: '/login'
            },
            {
                path: '/guide',
                component: '@/pages/Guide/Guide'
            },
            {
                path: '/login',
                component: '@/pages/Login/Login'
            },
            {
                path: '/findpass',
                component: '@/pages/Login/FindPass'
            },
            {
                path: '/main',
                component: '@/pages/Main/index.tsx',
                routes: [
                    {
                        path: '/main',
                        redirect: '/main/home'
                    },
                    ...routerList,
                    {
                        path: "*",
                        redirect: '/404'
                    }
                ]
            },
            ...ErrorRoutes,
            {
                path: "*",
                redirect: '/404'
            }
        ]
    },
]